package sg.nus.iss.vmcs.guilisteners;

import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import sg.nus.iss.vmcs.controllers.MaintenanceController;

/**
 * Action Listener for the Exit Button in the Maintenance Panel
 * @author Pang Pingli
 */
public class ExitButtonListener implements ActionListener {
	
	/** Maintenance Controller */
	private MaintenanceController  mctrl;

	/**
	 * Creates an instance of the ExitButton
	 * @param mc Reference to an instance of Maintenance Controller
	 */
	public ExitButtonListener(MaintenanceController  mc) {
		mctrl = mc;
	}
	
	/**
	 * Implementation of actionPerformed
	 */
	public void actionPerformed(ActionEvent e) {
        mctrl.logoutMaintainer();
	}
}